package com.zx.deploy.common.utils;

import java.io.Serializable;

/**
 * 分页辅助类
 * 
 * @author jbyu
 *
 */
public class PageHelper implements Serializable {

	private static final long serialVersionUID = 1L;
	private Integer pageIndex = 1;
	private Integer pageSize = 10;

	private Integer start = 0;

	public Integer getStart() {
		return (pageIndex - 1) * pageSize;
	}

	public void setStart(Integer start) {
		this.start = start;
	}

	public Integer getPageIndex() {
		if (pageIndex < 1)
			pageIndex = 1;
		return pageIndex;
	}

	public void setPageIndex(Integer pageIndex) {
		this.pageIndex = pageIndex;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}

}